package com.cc.eds.process;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.hutool.core.lang.Assert;

import java.io.File;

/**
 * DefaultEdsRead
 *
 * @author aa
 * @version 1.0
 * @since 2025/2/8
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DefaultEdsRead extends AbstractEdsRead {

    public DefaultEdsRead(File zipFile) {
        Assert.isTrue(checkZip(zipFile), "zip file does not exist");
        setDestPath(decompression(zipFile));
        Assert.notEmpty(this.getDestPath(), "decompression file error");
        loadXml(this.getDestPath());
    }
}
